/**
 * @file lv_sdfs.h
 * Implementation of sd card file system
 * The API is compatible with the lv_fs module.
 */

#ifndef LV_SDFS_H
#define LV_SDFS_H

#ifdef __cplusplus
extern "C"
{
#endif


/*********************
 *      INCLUDES
 *********************/
#include "lv_conf.h"

#if LV_USE_FILESYSTEM && USE_LV_SD_FS

/*********************
 *      DEFINES
 *********************/
#define SD_FS_LETTER      'D'

/* File attribute bits for directory entry (for ui used)*/
#define FILE_DIR    0x10    /* Directory */
#define FILE_ARC    0x20    /* Archive, normal file */
#define FILE_HID    0x40    /* Hidden, hide(or system) dir(or file) */
typedef enum
{
    FS_FILE_UNKNOWN,
    FS_FILE_BLK,
    FS_FILE_CHR,
    FS_FILE_DIR,
    FS_FILE_FIFO,
    FS_FILE_LNK,
    FS_FILE_REG,
    FS_FILE_SOCK,
    FS_FILE_PARENT,
} FILE_TYPE;

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Create a driver for sd fs and initialize it.
 */
extern void lv_sdfs_init(void);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_FILESYSTEM && USE_LV_SD_FS*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

